package day018.homework.p6;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

public class Test {
    public static void main(String[] args) throws ExecutionException,
            InterruptedException {
        ExecutorService threadPool = Executors.newFixedThreadPool(10);
        Future<Integer> future = threadPool.submit(new Calculator());
        Integer res = future.get();
        System.out.println("res:" + res);
        threadPool.shutdown();
    }
}
